package com.xx.sg.own.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xx.sg.handler.ListStrToStringHandler;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.List;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("sg_camera_plan")
public class CameraPlan {

    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    //监控方案
    @TableField(value = "plan_name")
    private String planName;

    @TableField(value = "camera_codes", typeHandler = ListStrToStringHandler.class)
    private List<String> cameraCodes;

    @TableField(value = "remark")
    private String remark;

    @TableField(value = "create_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

}
